Skip to content

Improve Slack startup resilience#19

Open
coe0718 wants to merge 2 commits intoghostwright:mainfrom
coe0718:slack-startup-resilience
Open

Improve Slack startup resilience#19
coe0718 wants to merge 2 commits intoghostwright:mainfrom
coe0718:slack-startup-resilience

Conversation

@coe0718
Copy link
Copy Markdown
Contributor

@coe0718 coe0718 commented Mar 31, 2026

Summary

This improves the Slack half of #16 by making startup more resilient when Socket Mode does not finish connecting.

  • add channel connection timeouts so a hung Slack connect does not block startup forever
  • expose richer channel diagnostics in /health via channel_details
  • track Slack connection errors/state for troubleshooting
  • keep onboarding logging explicit when Slack is still using Web API without an active Socket Mode connection
  • add focused router/slack tests and troubleshooting docs

Root Cause

Phantom can register the Slack channel and start the HTTP server before Socket Mode finishes connecting. If the Slack connect hangs, router.connectAll() can wait forever, leaving Slack registered but never connected and giving the operator very little signal about what state the channel is actually in.

Impact

Operators can now tell the difference between Slack being disconnected, still connecting, or failing with an error, and a stuck Slack connection will no longer stall the rest of startup.

Validation

  • bun test src/channels/__tests__/router.test.ts src/channels/__tests__/slack.test.ts
  • bun run lint
  • bun run typecheck

@coe0718 coe0718 marked this pull request as ready for review March 31, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant